import dpkt, pcap
import ctypes

print "hello"
pc = pcap.pcap("any")
#pc.setfilter('icmp')
for ts, pkt in pc:
        #print `dpkt.ethernet.Ethernet(pkt)`
        eth = dpkt.ethernet.Ethernet(pkt)
        dst_mac = (eth.dst).encode("hex")
        src_mac = (eth.src).encode("hex")
        print "Source MAC:", src_mac
        print "Dst MAC:",dst_mac
        if(dst_mac == "e89a8f974c9e"):
            print "Source MAC:", src_mac
            print "Dst MAC:",dst_mac
            print "Packet received on eth0"
        elif(dst_mac == "ec55f9c6e4b7"):
            print "Source MAC:", src_mac
            print "Dst MAC:",dst_mac
            print "Packet received on wlan0"

